export default {
    add(state,payload){
        state.books[payload].num++ 
    },
    sub(state,payload){
        if(state.books[payload].num == 1){
            return 
        }
        state.books[payload].num-- 
    },
    del(state,payload){
        state.books.splice(payload,1)
    },
    clickIsSelectAll(state,payload){
        state.books.forEach(item => {
            item.isSelected  =  !payload
        })
    }
}